package com.hoshiicloud.stock.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.stock.feign.hystrix.HystrixCompanyFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 公司微服务FeignClient
 *
 * @author : yangcheng
 * @date : 2019/5/6 14:23
 * @mail : maiboyc@163.com
 **/
@FeignClient(name = "hoshiicloud-company", fallback = HystrixCompanyFeignFallback.class)
public interface CompanyFeignService {

    /**
     * 根据id获取
     * @param id ID
     * @return Response
     */
    @RequestMapping(value = "/company/{id}", method = RequestMethod.GET)
    Response getById(@PathVariable("id") Long id);
}
